package com.kgc.library.libraryuserservice.service;

import com.kgc.library.bean.Bookmanage;
import com.kgc.library.libraryuserservice.mapper.BookmanageMapper;
import com.kgc.library.service.BookmanageService;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-09-30 9:06
 */
@Service
public class BookmanageServiceImpl implements BookmanageService {

    @Resource
    BookmanageMapper bookmanageMapper;




    @Override
    public List<Bookmanage> selectBookmanage() {


/*        Bookmanage bookmanage=null;
        Jedis jedis = redisUtil.getJedis();
        String skuInfoJson = jedis.get(key);*/
        List<Bookmanage> bookmanages = bookmanageMapper.selectByExample(null);
        return bookmanages;
    }

    @Override
    public Integer addBookmanage(Bookmanage bookmanage) {
        int insert = bookmanageMapper.insert(bookmanage);
        return insert;
    }

    @Override
    public Integer deleteBookmanage(Long bId) {

        return bookmanageMapper.deleteByPrimaryKey(bId);
    }
}
